﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace emlak
{
    public partial class frmKisiArama : Form
    {
        public frmKisiArama()
        {
            InitializeComponent();
        }

        public void rakam(KeyPressEventArgs e)
        {

            if (char.IsDigit(e.KeyChar) || e.KeyChar == Convert.ToChar(Keys.Back))
            {
                e.Handled = false;
            }
            else
                e.Handled = true;
        }

        public void harf(KeyPressEventArgs e)
        {

            if (char.IsLetter(e.KeyChar) || e.KeyChar == Convert.ToChar(Keys.Back))
            {
                e.Handled = false;
            }
            else
                e.Handled = true;
        }


        private void txtTCno_KeyPress(object sender, KeyPressEventArgs e)
        {
            rakam(e);
        }

        private void txtAdi_KeyPress(object sender, KeyPressEventArgs e)
        {
            harf(e);
        }

        private void txtSoyadi_KeyPress(object sender, KeyPressEventArgs e)
        {
            harf(e);
        }

        private void txtmeslek_KeyPress(object sender, KeyPressEventArgs e)
        {
            harf(e);
        }

        private void txtunvan_KeyPress(object sender, KeyPressEventArgs e)
        {
            harf(e);
        }

       

    }
}
